package net.sourceforge.openclixml;

import net.sourceforge.openclixml.ext.RulesType;

import org.w3c.dom.Document;

import java.util.Map;


/**
 *
 * @version $Revision: 39 $
 * @author dominikjungo
 *
 * Last changed: $Date: 2008-01-22 21:38:51 +0100 (Tue, 22 Jan 2008) $
 * The License for this file can be found in doc/Licenses/license-OpenCliXML.txt
 */
public interface IValidator {
    /**
     * Validates a document and loads the schema from the document's inline reference.
     * @param systemUnderTest the document that should be tested.
     * @return the report of validation.
     * @throws net.sourceforge.openclixml.ClixmlException if the validation cannot be executed
     */
    RulesType validate(final Document systemUnderTest) throws ClixmlException;

    /**
     * 
     * @param systemUnderTest The documents that are tested. The documents are in a map with a namespace as key and document as value. One document must be the default document without namespace.
     * @param rules the rules that are used to validate the documents.
     * @return the report of validation.
     * @throws net.sourceforge.openclixml.ClixmlException if the validation cannot be executed
     */
    RulesType validate(final Map<String, Document> systemUnderTest,
        net.sourceforge.openclixml.autogen.RulesType rules)
        throws ClixmlException;
}
